package com.muyu.cloud.system.service.impl;

import com.muyu.cloud.system.domain.UserInfo;
import com.muyu.cloud.system.mapper.UserInfoMapper;
import com.muyu.cloud.system.service.UserInfoService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @Author: DongZeLiang
 * @date: 2024/5/24
 * @Description: 用户业务实现层
 * @Version: 1.0
 */
@Service
@AllArgsConstructor
public class UserInfoServiceImpl implements UserInfoService {

    private final UserInfoMapper userInfoMapper;
    /**
     * 通过用户名称查询用户信息
     *
     * @param userName 用户名称
     *
     * @return 用户信息
     */
    @Override
    public UserInfo selectByUserName (String userName) {
        return userInfoMapper.selectByUserName(userName);
    }
    /**
     * 注册
     */
    @Override
    public void register(String userName, String password) {
        userInfoMapper.register(userName,password);
    }
}
